<extend name="Order/personalEdit"/>
<!-- 清空头部广告 -->
<block name="ad_top"></block>

<block name='content'>
		 
	<div class="mcole-section-wrap w">
		<div class="nav clearfix">
			<ol class="clearfix fl">
			    <if condition="$status eq '0'">
				<li class="fl active"><a href="{:U('Assets/myCollection')}">全部商品<b>（{$count}）</b></a></li>
				<li class="fl"><a href="{:U('Assets/collection_price')}" class="active"> 降价商品 <b>{$price_count}</b></a></li>
				<else/>
				<li class="fl"><a href="{:U('Assets/myCollection')}">全部商品<b>（{$count}）</b></a></li>
				<li class="fl  active"><a href="{:U('Assets/collection_price')}" class="active"> 降价商品 <b>{$price_count}</b></a></li>
				</if>
			</ol>
			<form action="{:U('Assets/ajax_goods')}" method="post" id="form">
			<div class="search fr clearfix">
				<input type="text" name="search" id="search" class="fl text">
				<input type="submit" class="fl btn" value="">
			</div>
			</form>
		</div>
		<ul class="content-main clearfix">
		    <volist name="data" id="vo">
				<li class="fl" id="del{$vo.id}">
					<div class="screenshot">
						<a href="javascript:;"><img src="__SERVER__{$vo.images}"></a>
					</div>
					<div class="products-description">
						<p><a href="javascript:;">{$vo.title} </a></p>
						<span class="products-prices">¥ {$vo.price_member}</span>
					</div>

					<div class="products-operation clearfix">
						<input type="button" value="加入购物车" data-value="{$vo.goods_id}" class="fl search-text cart_add">
						<input type="button" name="del" value="删除" data-value="{$vo.id}" class="fl search-btn">
					</div>
				</li>
			</volist>
		</ul>
	</div>
	<div class="page">{$page}</div>
	<!--右侧一键到顶 and 客服-->
	<include file="Order/personalHomeTop"/>
	<!--尾部-->
<script src="__JS__/assets/assets.js"></script>	
<!-- <script src="__JS__/header.js"></script> -->
<script>
	$('.mcole-section-wrap .content-main').on('mouseenter','li',function(){
		$(this).addClass('hover');
	}).on('mouseleave','li',function(){
		$(this).removeClass('hover');
	});
	$('.mcole-section-wrap .nav ol li').on('click',function(){
		$('.mcole-section-wrap .nav ol li').removeClass('active').eq($(this).index()).addClass('active');
	});
	 $('.mcole-section-wrap .content-main').on('click','.products-operation .cart_add',function(){
	 	var goods_id = $(this).attr('data-value');
        $.post("/index.php/Home/Cart/cart_add", { 'goods_id':goods_id, 'goods_num':"1"},function(data){
            if (data.status == 1) {
            	parent.layer.msg('添加成功', {icon: 1, time: 3000 });
            }else{
                parent.layer.msg('添加失败', {icon: 2, time: 2000 }); 
            };
        });
    });
</script>
</block>